package JavaBasic2_20200415;

import java.util.Scanner;

public class WuWeiShuQiuHe4 {
	// 4：输入一个5位整数，求他们每一位上数字的和，并输出
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		System.out.println("请输入一个五位数：");
		int a = in.nextInt();
		System.out.println(a + "每一位上数字的和:" + (a % 10 + a / 10 % 10 + a / 100 % 10 + a / 1000 % 10 + a / 10000));

	}

}
